using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using RuoVea.GoFastdfs.Entity;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
namespace RuoVea.GoFastdfs.Web.Controllers
{

/// <summary>
/// 文件上传Controller
/// </summary>
    public class FileController : BaseController
    {

        //@Value("${upload.temp.path}")
        //private String tempPath;

        [Route("/file/upload")]
        public IActionResult upload()
        {
            ViewData["showAddress"] = getUploadShowUrl();
            return View();
        }

        //[Route("/file/upload/moreFileUpload")]
        //public ResponseBean moreFileUpload(@RequestParam("file") MultipartFile file, String scene, String path, String showUrl) {
        //    if (file.isEmpty()) {
        //        return ResponseBean.fail("请选择文件");
        //    }
        //    if (StringUtils.isBlank(scene)) {
        //        return ResponseBean.fail("请填写上传场景");
        //    }
        //    if (StrUtil.isBlank(showUrl)) {
        //        showUrl = getUploadShowUrl();
        //    }
        //    return UploadUtils.upload(file, getPeersUrl() + Constant.API_UPLOAD, showUrl);
        //}
    }
}
